package com.xuecheng.orders.service;

import com.xuecheng.messagesdk.model.po.MqMessage;
import com.xuecheng.orders.model.dto.AddOrderDto;
import com.xuecheng.orders.model.dto.PayRecordDto;
import com.xuecheng.orders.model.po.XcPayRecord;

public interface OrderService {
    PayRecordDto createOrder(String userId, AddOrderDto addOrderDto);

    XcPayRecord getPayRecordByPayNo(String payNo);

    /**
     * 查询支付结果,拿到结果后更新支付记录表和订单表中的支付状态
     * @param payNo
     */
    PayRecordDto queryPayResult(String payNo);

    /**
     * 发送通知结果
     * @param mqMessage
     */
    void notifyPayResult(MqMessage mqMessage);
}
